Open
Conversation
Add a new RPC / WS call for `server_definitions`, which returns an
SDK-compatible `definitions.json` (binary enum definitions) generated by
the server. This enables clients/libraries to dynamically work with new
fields and features, such as ones that may become available on side
chains. Clients query `server_definitions` on a node from the network
they want to work with, and immediately know how to speak that node's
binary "language", even if new features are added to it in the future
(as long as there are no new serialized types that the software doesn't
know how to serialize/deserialize).
Example:
```js
> {"command": "server_definitions"}
< {
"result": {
"FIELDS": [
[
"Generic",
{
"isSerialized": false,
"isSigningField": false,
"isVLEncoded": false,
"nth": 0,
"type": "Unknown"
}
],
[
"Invalid",
{
"isSerialized": false,
"isSigningField": false,
"isVLEncoded": false,
"nth": -1,
"type": "Unknown"
}
],
[
"ObjectEndMarker",
{
"isSerialized": false,
"isSigningField": true,
"isVLEncoded": false,
"nth": 1,
"type": "STObject"
}
],
...
```
Close #3657
---------
Co-authored-by: Richard Holland <richard.holland@starstone.co.nz>
Implement native support for Price Oracles. A Price Oracle is used to bring real-world data, such as market prices, onto the blockchain, enabling dApps to access and utilize information that resides outside the blockchain. Add Price Oracle functionality: - OracleSet: create or update the Oracle object - OracleDelete: delete the Oracle object To support this functionality add: - New RPC method, `get_aggregate_price`, to calculate aggregate price for a token pair of the specified oracles - `ltOracle` object The `ltOracle` object maintains: - Oracle Owner's account - Oracle's metadata - Up to ten token pairs with the scaled price - The last update time the token pairs were updated Add Oracle unit-tests
The compilation fails due to an issue in the initializer list of an optional argument, which holds a vector of pairs. The code compiles correctly on earlier gcc versions, but fails on gcc 13.
* It is now an invariant that all constructed Public Keys are valid, non-empty and contain 33 bytes of data. * Additionally, the memory footprint of the PublicKey class is reduced. The size_ data member is declared as static. * Distinguish and identify the PublisherList retrieved from the local config file, versus the ones obtained from other validators. * Fixes #2942
This algorithm is about an order of magnitude faster than the existing algorithm (about 10x faster for encoding and about 15x faster for decoding - including the double hash for the checksum). The algorithms use gcc's int128 (fast MS version will have to wait, in the meantime MS falls back to the slow code).
* uses same formatting as admin RPC * hides potentially sensitive data
This is likely the result of a typo when the code was simplified.
Fixes some mistakes in #4885
…#4893) We are currently using old version 0.6.2 of `xxhash`, as a verbatim copy and paste of its header file `xxhash.h`. Switch to the more recent version 0.8.2. Since this version is in Conan Center (and properly protects its ABI by keeping the state object incomplete), add it as a Conan requirement. Switch to the SIMD instructions (in the new `XXH3` family) supported by the new version.
* telENV_RPC_FAILED is a new code, reserved exclusively for unit tests when RPC fails. This will make those types of errors distinct and easier to test for when expected and/or diagnose when not. * Output RPC command result when result is not expected.
This amendment fixes an edge case where an empty DID object can be created. It adds an additional check to ensure that DIDs are non-empty when created, and returns a `tecEMPTY_DID` error if the DID would be empty.
We do not currently enforce that incoming peer connection does not have remote_endpoint which is already used (either by incoming or outgoing connection), hence already stored in slots_. If we happen to receive a connection from such a duplicate remote_endpoint, it will eventually result in a crash (when disconnecting) or weird behavior (when updating slot state), as a result of an apparently matching remote_endpoint in slots_ being used by a different connection.
This fixes a case where a peer can desync under a certain timing circumstance--if it reaches a certain point in consensus before it receives proposals. This was noticed under high transaction volumes. Namely, when we arrive at the point of deciding whether consensus is reached after minimum establish phase duration but before having received any proposals. This could be caused by finishing the previous round slightly faster and/or having some delay in receiving proposals. Existing behavior arrives at consensus immediately after the minimum establish duration with no proposals. This causes us to desync because we then close a non-validated ledger. The change in this PR causes us to wait for a configured threshold before making the decision to arrive at consensus with no proposals. This allows validators to catch up and for brief delays in receiving proposals to be absorbed. There should be no drawback since, with no proposals coming in, we needn't be in a huge rush to jump ahead.
When calculating reward shares, the amount should always be rounded down. If the `fixUniversalNumber` amendment is not active, this works correctly. If it is not active, then the amount is incorrectly rounded up. This patch introduces an amendment so it will be rounded down.
* master is the default branch for that project. There's no point in using develop.
This amendment, `fixPreviousTxnID`, adds `PreviousTxnID` and `PreviousTxnLgrSequence` as fields to all ledger objects that did not already have them included (`DirectoryNode`, `Amendments`, `FeeSettings`, `NegativeUNL`, and `AMM`). This makes it much easier to go through the history of these ledger objects.
--------- Co-authored-by: Howard Hinnant <howard.hinnant@gmail.com> Co-authored-by: Mark Travis <mtravis@ripple.com> Co-authored-by: Bronek Kozicki <brok@incorrekt.com> Co-authored-by: Mayukha Vadari <mvadari@gmail.com> Co-authored-by: Chenna Keshava <ckeshavabs@gmail.com>
--------- Co-authored-by: Howard Hinnant <howard.hinnant@gmail.com> Co-authored-by: Mark Travis <mtravis@ripple.com> Co-authored-by: Bronek Kozicki <brok@incorrekt.com> Co-authored-by: Mayukha Vadari <mvadari@gmail.com> Co-authored-by: Chenna Keshava <ckeshavabs@gmail.com>
* Specifically, test using tfLPToken flag
The `rotateWithLock` function holds a lock while it calls a callback function that's passed in by the caller. This is a problematic design that needs to be used very carefully. In this case, at least one caller passed in a callback that eventually relocks the mutex on the same thread, causing UB (a deadlock was observed). The caller was from SHAMapStoreImpl, and it called `clearCaches`. This `clearCaches` can potentially call `fetchNodeObject`, which tried to relock the mutex. This patch resolves the issue by changing the mutex type to a `recursive_mutex`. Ideally, the code should be rewritten so it doesn't hold the mutex during the callback and the mutex should be changed back to a regular mutex. Co-authored-by: Ed Hennis <ed@ripple.com>
Member
Author
|
TODO: update |
12 tasks
Collaborator
|
bump |
Member
Author
|
This PR is ready for review. |
* Hook API Refactor2: Amendment Guards (#621) * Hook API Refactor3: Consolidate the Hook API definitions from Enum.h and ApplyHook.h into a single file. (#622) * Hook API Refactoring / Unit Testing (#581) * Hook API Refactor2: Amendment Guards (#621) * Hook API Refactor3: Consolidate the Hook API definitions from Enum.h and ApplyHook.h into a single file. (#622) * Hook API Refactoring / Unit Testing (#581) * fix: update clang-format to v18 and fix include ordering - Update verify-generated-headers CI to use clang-format 18 (matching clang-format.yml) instead of stale v10 which can't parse .clang-format - Add .mise.toml for local clang-format 18 tooling - Fix include ordering in cherry-picked files per clang-format 18 * chore: update levelization results for HookAPI changes New loop: xrpl.hook <-> xrpld.app due to HookAPI.h including Transaction.h from xrpld.app. --------- Co-authored-by: tequ <git@tequ.dev>
* Hook API Refactor2: Amendment Guards (#621) * Hook API Refactor3: Consolidate the Hook API definitions from Enum.h and ApplyHook.h into a single file. (#622) * Hook API Refactoring / Unit Testing (#581) * fix `Xahau Ledger` to `Xahau Network` (#651) * Add GitHub Actions workflow for Guard Checker Build (#658) * fix `Xahau Ledger` to `Xahau Network` (#651) * Add GitHub Actions workflow for Guard Checker Build (#658) * fix: update guard checker build path for directory restructure * fix: update stale ripple include paths in hook headers * fix(test): avoid deleted PublicKey default ctor in HookAPI test * chore(levelization): update ordering after hook/protocol dependency change --------- Co-authored-by: tequ <git@tequ.dev>
# Conflicts: # .github/workflows/guard-checker-build.yml # .github/workflows/verify-generated-headers.yml # Builds/CMake/RippledCore.cmake # hook/generate_extern.sh # hook/sfcodes.h # include/xrpl/basics/Expected.h # include/xrpl/hook/Enum.h # include/xrpl/hook/HookAPI.h # include/xrpl/hook/hook_api.macro # include/xrpl/protocol/Feature.h # include/xrpl/protocol/jss.h # src/libxrpl/protocol/Feature.cpp # src/ripple/protocol/SField.h # src/ripple/protocol/impl/LedgerFormats.cpp # src/ripple/protocol/impl/SField.cpp # src/test/app/HookAPI_test.cpp # src/test/jtx/hook.h # src/test/jtx/impl/hook.cpp # src/xrpld/app/hook/applyHook.h # src/xrpld/app/hook/detail/HookAPI.cpp # src/xrpld/app/hook/detail/applyHook.cpp # src/xrpld/app/tx/detail/Change.cpp
…2.4.0 # Conflicts: # include/xrpl/protocol/Feature.h # src/test/app/SetHook_wasm.h
- Add missing getHookOn declaration and implementation (build blocker) - Add else branches for HookOnOutgoing/HookOnIncoming in hsoUPDATE path - Guard unprotected optional dereferences in hsoINSTALL path - Reorder features.macro per review (HookOnV2/HooksUpdate2 before fixHookAPI20251128)
Merge dev (67a6970) into sync-2.4.0: HookOnV2 + prepare API
…3e8039c5 # Conflicts: # BUILD.md # cfg/xahaud-example.cfg # src/xrpld/app/tx/detail/Change.cpp
Merge dev (c3e8039) into sync-2.4.0: fixXahauGenesisOwnerCount + docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
High Level Overview of Change
Context of Change
Type of Change
.gitignore, formatting, dropping support for older tooling)API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)New Amendments
featureDeepFreeze
featurePermissionedDomains
featureDynamicNFT
featureCredentials
featureAMMClawback
featureMPTokensV1
featureInvariantsV1_1
featureNFTokenMintOffer
featurePriceOracle
featureDID
featureXChainBridge
featureAMM
featureClawback
fixNFTokenPageLinks
fixEnforceNFTokenTrustline
fixReducedOffersV1
fixPreviousTxnID
fixInnerObjTemplate
fixNFTokenReserve
fixFillOrKill
fixDisallowIncomingV1
1.12.0
#4485 XRPLF/rippled@6b4437d (NOT MERGED - Build(Conan))Merged at below2.0.0, 2.0.1
#4312 XRPLF/rippled@36cb5f9 (Conflict - Modifled)
#4667 XRPLF/rippled@6f74a74
#4630 XRPLF/rippled@c6f6375 (Conflict - Modifled)
#4637 XRPLF/rippled@31c8281 (Conflict - Modifled)
#4338 XRPLF/rippled@a955057 (NOT MERGED - Doc)
#4697 XRPLF/rippled@3b5fcd5
#4503 XRPLF/rippled@1d9db1b (NOT MERGED - Reverted)
#4504 XRPLF/rippled@002893f (NOT MERGED - Reverted)
#4505 XRPLF/rippled@f259cc1 (NOT MERGED - Reverted)
#4620 XRPLF/rippled@7fae1c1
#4292 XRPLF/rippled@649c11a (Conflict - Modifled) ChainBridge
#4702 XRPLF/rippled@ce570c1 (Revert Commit for #4697)
#4634 XRPLF/rippled@5427321 (Conflict - Modifled) / match.hpp has format diff but should be ignored
#4708 XRPLF/rippled@237b406
#4709 XRPLF/rippled@5b7d2c1
#4707 XRPLF/rippled@01fc4b0
#4507 XRPLF/rippled@3397922
#4672 XRPLF/rippled@65df4bc
#4574 XRPLF/rippled@e86181c
#4653 XRPLF/rippled@7bff9dc (Conflict - Modifled) src/secp256k1/* has format diff but should be ignored
#4691 XRPLF/rippled@9f102fc
#4585 XRPLF/rippled@8f65bc2 (NOT MERGED - APIChangelog)
#4635 XRPLF/rippled@a948203
#4632 XRPLF/rippled@77e0912
#4618 XRPLF/rippled@2487dab (Conflict - Modifled)
#4718 XRPLF/rippled@5433e13
#3839 XRPLF/rippled@8f89694 (NOT MERGED - Reverted)
#4722 XRPLF/rippled@e4db0fb
#4566 XRPLF/rippled@6b61505
#4628 XRPLF/rippled@548c91e (Conflict - Modifled)
#4731 XRPLF/rippled@b92d511
#4410 XRPLF/rippled@2bb8de0
#4720 XRPLF/rippled@925aca7
#4700 XRPLF/rippled@e27d24b
#4675 XRPLF/rippled@3dea78d (NOT MERGED - Already appled by Fix240819 #350)
#4724 XRPLF/rippled@0c43eb3 (NOT MERGED - APICHangelog)
#4662 XRPLF/rippled@40ebbec (NOT MERGED - Doc(SECURITY typo))
#4715 XRPLF/rippled@4e84ad6 (Conflict - Modifled)
#4710 XRPLF/rippled@ec86260 (Conflict - Modifled)
#4721 XRPLF/rippled@6ba9450 x fixDisallowIncomingV1
#4753 XRPLF/rippled@ced14ec x
#4741 XRPLF/rippled@053b69c (MERGED - APICHangelog not merged)
#4716 XRPLF/rippled@3e08c39 (NOT MERGED - Workflow)
#4746 XRPLF/rippled@1151fba (NOT MERGED - Workflow)
#4743 XRPLF/rippled@50cc1cf
#4740 XRPLF/rippled@c915984 (NOT MERGED - Build/conan)
#4596 XRPLF/rippled@1fde585 (NOT MERGED - Workflow)
#4757 XRPLF/rippled@be6ac7e (NOT MERGED - PR Template)
#4562 XRPLF/rippled@b69156a
#4559 XRPLF/rippled@41cd337 (NOT MERGED - tecHOOK_REJECTED reserve)
#4636 XRPLF/rippled@b421945 (Conflict - Modifled) DID (ltDID duplicat with ltIMPORT_VLSEQ 0x49->0x4449)
#4703 XRPLF/rippled@078bd60 (NOT MERGED - server_definitions)
#4737 XRPLF/rippled@8d86c5e (NOT MERGED - NetworkID)
#4756 XRPLF/rippled@5af9dc5 (NOT MERGED - Workflow)
#4596 XRPLF/rippled@5026cbd (NOT MERGED - Workflow)
#4733 XRPLF/rippled@3972683 (Conflict - Modifled)
#4729 XRPLF/rippled@3e5f770
#4759 XRPLF/rippled@1eac4d2
#4788 XRPLF/rippled@ac02e56
#4694 XRPLF/rippled@3b624d8 fixFillOrKill
#4677 XRPLF/rippled@26b0322
#4791 XRPLF/rippled@85342b2 (NOT MERGED - Dockerfile)
#4785 XRPLF/rippled@056255e
#4798 XRPLF/rippled@09e0f10
#4775 XRPLF/rippled@32ced49 (Conflict - Modifled)
#4807 XRPLF/rippled@4cb0bcb
#4803 XRPLF/rippled@ac27089
#4813 XRPLF/rippled@7b49f1e (NOT MERGED - gitlab-ci)
#4812 XRPLF/rippled@d593972
#4760 XRPLF/rippled@8ce85a9 (NOT MERGED - Reverted)
#4760 XRPLF/rippled@4977a5d (NOT MERGED - 2.0.0-RC2)
#4807 XRPLF/rippled@4dff203 (Duplicate Commit)
#4803 XRPLF/rippled@96c926c (Duplicate Commit)
#4813 XRPLF/rippled@f95fa33 (Duplicate Commit)
#4812 XRPLF/rippled@d5059b1 (Duplicate Commit)
#4760 XRPLF/rippled@c171090 (Duplicate Commit)
#4824 XRPLF/rippled@f05acbd (NOT MERGED - versioning)
#4823 XRPLF/rippled@92957d6 (NOT MERGED - marge release into dev)
#4836 XRPLF/rippled@2e93dd5 (NOT MERGED - gitlab-ci)
#4828 XRPLF/rippled@923e1ce (NOT MERGED - APICHangelog)
#4784 XRPLF/rippled@e33a6d5 (NOT MERGED - APICHangelog)
#4820 XRPLF/rippled@c045060
#4827 XRPLF/rippled@fe8621b
#4505 XRPLF/rippled@5aef102 (NOT MERGED - Revert Commit)
#4817 XRPLF/rippled@06251aa
#4821 XRPLF/rippled@656948c
#4773 XRPLF/rippled@3b191a3 (NOT MERGED - APICHangelog)
#4850 XRPLF/rippled@ffb53f2 (NOT MERGED - Revert Commit)
#4852 XRPLF/rippled@c53a5e7 (NOT MERGED - Revert Commit)
#4863 XRPLF/rippled@350d213 (NOT MERGED - versioning)
#4703 XRPLF/rippled@078bd60 (Conflict - Modified) Serve_Definition, RPC processing remains unchanged, other parts are merged
2.1.0, 2.1.1
#4860 XRPLF/rippled@90d463b x test: add unit test for redundant payment (#4860)
#4871 XRPLF/rippled@f9e3658 (NOT MERGED - CI) test: check for success/failure of Windows CI unit tests (#4871)
#4831 XRPLF/rippled@6f00d32 x fix(libxrpl): change library names in Conan recipe (#4831)
#4767 XRPLF/rippled@828bb64 (Modified - Conflict) fixNFTokenReserve: ensure NFT tx fails when reserve is not met (#4767)
#4885 XRPLF/rippled@1e96a1d (Modified - Conflict) build: add headers needed in Conan package for libxrpl (#4885)
#4728 XRPLF/rippled@6d3c21e (Modified - Conflict) feat: allow port_grpc to be specified in [server] stanza (#4728)
#4906 XRPLF/rippled@be12136 (Modified - Conflict) fixInnerObjTemplate: set inner object template (#4906)
#4917 XRPLF/rippled@e74cb35 x test: guarantee proper lifetime for temporary Rules object: (#4917)
#4968 XRPLF/rippled@e4796a1 fix: improper handling of large synthetic AMM offers:
2.2.0~2.2.3
m->signingKeyat Import.cpp)2.2.1
2.2.2
2.2.3
2.3.0, 2.3.1
2.3.0
2.3.1
2.4.0